package net.uhuijia.user.userCartItem.service;

import net.uhuijia.appbase.service.BaseService;
import net.uhuijia.user.usermall.persistence.model.UserMall;
import net.uhuijia.vo.cart.UserCartItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import net.uhuijia.appbase.service.CrudService;
import net.uhuijia.user.userCartItem.persistence.dao.UserCartItemDao;
import net.uhuijia.user.userCartItem.persistence.model.UserCartItem;
import net.uhuijia.user.userCartItem.persistence.model.UserCartItemExample;

import java.util.List;


@Service
@Transactional
public interface UserCartItemService
     extends BaseService<UserCartItem,UserCartItemExample> {

    /**
     * @Author xzj
     * @Description //查询用户购物车
     * @Date  2018/10/8
     * @Param
     * @return
     **/
    UserCartItem getUserCartItemByUserIdAndCartIdAndSkuId(String userId,String cartId,String skuId);

    /**
     * @Author xzj
     * @Description //添加购物车数据
     * @Date  2018/10/8
     * @Param
     * @return
     **/
    UserCartItem addUserCartItem(String userId,String cartId,String spuId,String skuId,int count);

    /**
     * @Author xzj
     * @Description //根据购物车Id 查询购物车下的商品集合
     * @Date  2018/10/8
     * @Param
     * @return
     **/
    List<UserCartItem> findUserCartItemByCartId(String cartId);
    /**
     * @Author xzj
     * @Description //根据购物车Id 查询购物车下的商品集合
     * @Date  2018/10/8
     * @Param 
     * @return 
     **/
    List<UserCartItemVo> findUserCartItemVoByCartId(String cartId);
    /**
     * @Author xzj
     * @Description //删除购物车商品项
     * @Date  2018/10/8
     * @Param
     * @return
     **/
    String delCartItem(UserMall userMall ,String cartItemId);
}